package com.CST.controller.ys;

import com.CST.common.api.ResultObject;
import com.CST.dto.ys.YsAssessmentScoringDTO;
import com.CST.service.ys.YsAssessmentScoringService;
import com.CST.vo.ys.YsAssessmentScoringVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

/**
 * @author cw
 */
@RestController
@RequestMapping("/ysAssessmentScoring")
@Api(tags = "预算考核计分基础表")
public class YsAssessmentScoringController {

    @Autowired
    private YsAssessmentScoringService targetService;

    @ApiOperation("分页查询")
    @PostMapping("/getScoreList")
    public ResultObject<PageInfo<YsAssessmentScoringVO>> getScoreList(@RequestBody YsAssessmentScoringDTO dto){
        return ResultObject.success(targetService.getScoreList(dto));
    }

    @ApiOperation("导出")
    @PostMapping("/importExcel")
    public ResultObject<Boolean> importExcel(HttpServletResponse response, @RequestBody YsAssessmentScoringDTO dto){
        return ResultObject.success(targetService.importExcel(response, dto));
    }

}
